package com.tiancheng.onecode.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tiancheng.onecode.entity.MemberOrderRefund;
import com.tiancheng.onecode.model.request.admin.QueryOrderRefundReq;
import com.tiancheng.onecode.model.request.admin.StatisticsMerchantOrderReq;
import com.tiancheng.onecode.model.request.admin.StatisticsUserOrderReq;
import com.tiancheng.onecode.model.response.admin.QueryOrderRefundRes;
import com.tiancheng.onecode.model.response.admin.StatisticsMerchantOrderPayRes;
import com.tiancheng.onecode.model.response.admin.StatisticsUserOrderItemRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: kellen
 * @Description: 会员订单退款 mapper
 * @Date: create in 2024/12/23 20:03
 */
@Mapper
public interface MemberOrderRefundMapper extends MYBaseMapper<MemberOrderRefund> {

    /**
     * 查询退款列表
     *
     * @return
     */
    IPage<QueryOrderRefundRes> queryPage(IPage<MemberOrderRefund> page, @Param("c") QueryOrderRefundReq params);

    /**
     * 根据退款单号查询
     *
     * @param refundId 退款单号
     * @return
     */
    List<QueryOrderRefundRes> queryByRefundId(@Param("refundId") String refundId);

    /**
     * 按天统计商户订单
     * @param statisticsMerchantOrderReq
     * @return
     */
    List<StatisticsMerchantOrderPayRes> statisticsByMerchant(StatisticsMerchantOrderReq statisticsMerchantOrderReq);

    /**
     * 按天统计用户订单
     * @param statisticsUserOrderReq
     * @return
     */
    List<StatisticsUserOrderItemRes> statisticsByUserId(StatisticsUserOrderReq statisticsUserOrderReq);

    /**
     * 按天统计
     * @param statisticsMerchantOrderReq
     * @return
     */
    List<StatisticsMerchantOrderPayRes> statisticsByDay(StatisticsMerchantOrderReq statisticsMerchantOrderReq);
}
